Field of the Invention
The present invention relates to an information processing apparatus that communicates with a file server managing a document file, a control method, and a storage medium storing a program.
Description of the Related Art
Document management systems are known which store documents and provide various functions in response to requests from clients. In such a system, information on a document is registered and managed in a database. A document entity, which is a file itself, is also stored and managed in the database.
In the case where two or more programs operate simultaneously to read or write data from or into the database, these programs may access the same data simultaneously. Here, when the access operations are performed for both reading and writing of data, appropriate exclusive control is required. To be more specific, when a program A writes into specific data and a different program B also accesses this specific data at the same time, data consistency cannot be maintained. To prevent such a problem, while the program A is writing into the specific data, the program B is blocked to access this data. This block processing is phrased as “the program A locks the data”. The blocked program B waits to perform its own operation until the data is unlocked. Alternatively, the program B determines that an error occurs and suspends the operation.
A system is known which includes a plurality of apparatuses and a common database (see Japanese Patent Laid-Open No. 2002-123309). When one of the apparatuses attempts to update data stored in the database, all the apparatuses are notified of the locked state of the database. Then, the lock is released only for the apparatus attempting the update, and this apparatus executes the update processing. After the completion of the processing, the system unlocks the database for all the apparatuses.
As Japanese Patent Laid-Open No. 2002-123309 describes, data consistency can be maintained by using the lock. However, processing related to a document entity, such as document registration, is more likely to take longer time than the processing related to information associated with the document, such as a document name. For this reason, a continuous lock applied to the document entity significantly affects the overall system, delaying the processing performed by the overall system, for example.